cmake_minimum_required(VERSION 3.10)  

# 设置项目名称和版本  
project(TestOpenCV VERSION 1.0)  

# 查找 OpenCV 包  
find_package(OpenCV REQUIRED)  

# 包含头文件目录  
include_directories(include)  

# 源文件目录  
file(GLOB SOURCES "src/*.cpp")  

# 添加可执行文件  
add_executable(test_opencv ${SOURCES})  

# 链接 OpenCV 库  
target_link_libraries(test_opencv ${OpenCV_LIBS})  

# 添加编译选项（可选）  
set_target_properties(test_opencv PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED YES)